﻿using Common.Authentication;
using Microsoft.AspNetCore.Authentication;

namespace System;

public static class AppJwtAuthenticationExtensions
{
    public static AuthenticationBuilder AddAppJwtBearer(this AuthenticationBuilder builder,
        Action<AppJwtAuthenticationOptions> configureOptions)
    {
        return builder.AddScheme<AppJwtAuthenticationOptions, AppJwtAuthenticationHandler>(
            AppJwtBearerDefaults.AuthenticationScheme, "Bearer", configureOptions);
    }
}